refactoring (AI-661)