made thread yield on every loop