change some of the wait statements