add and refactoring