change Least Square method