small refactoring for better testing