original pipeline script from gracie