UPDATED: piecewiseLinearApproximation