refactoring and removing unnecessary comments