update to optimization example