method of least sqruar