added check for y-value difference if exceeds threshold
Merge pull request #3 from ktran03/smooth_curve

merge