Least Squares Method