refactoring: inlining a helper method and renaming