adding css and refactoring