IDEX-569: code refactoring