CFY-799 small refactoring