fixed constrained curve-fitting, though negative degrees are still an issue, updated plotting routine