update optimize in 1D