integration and refactoring