TODO: need to fix scaling and better understand splines