method of least square