Refactoring
fixed merge conflicts