CFY-598 small refactoring