Factors contributing to the rise of nationalism