refactoring of renaming method to more descriptive name and adding comments