refactored and changed styles