uncommented pegasus_wait