refactor and rename method