I had originally had everything in the step method, but realized that I was keeping track of iterations in two places, so switched to this implementation, since tuning is a function of the current and past iterations. I can certainly go back if it better suits us.