commenting and refactoration