Slight modification to waitwait.py