add css and refactor