del comments and refactoring code