Moved WaitUS to be a public function