Moving some logic from run() to update and render steps