Factors influencing transition to democracy