change sleep to yield