refactor deployment process