TMDM-7686: code refactoring