added css and refactored