changed odr to lsq - **not sure about the parameter errors**