corrected gpsp script