refactoring in progress
after merge