styling and refactor