update normalize function.