updated least_square.py