PIM-3323: refactoring