code refactoring in progress