yield every n iterations