more refactoring for testability