moved javascript to spline.js