busy wait version complete