updated with syncronized yield