LUN-819 -- refactoring