update for one iteration