deploy script improved