breaking splines reader into more functions