fine tuned deploy script