final version of least squares uploaded