adding and refactoring