changed wait() to sleep() since wait does not do what we need.