code optimize.