preparing code for the next iteration