refactored deploy-script