refactored and added styles