commenting and refactoring methods