refactoring for #REES-557 task