add spline eval util function