rewrite deployment scripts