refactoring; code comments