style and refactor