Can we replace this sleep with a more specific wait method?