added option to choose spline cost