upgraded deploy script