update script to match one working on server