refactoring: renamed/extracted functions