refactoring and comment updated

change upon request; refactoring