Adjustin gthe code for curve.py