comments and refactoring