made script work automatically on both gordon and trestles