some refactoring changes
conflict resolved