CFY-1840 refactoring