refactor deploy.