refactor deploy