Should use Thread.yield() instead of sleep