refactoring: move method to where it is used exclusively