prepare to next iteration