refactoring deploy