minor modification to automation script