update for optimization