refactoring and added comments