got the initial curve working - looks like crap, but it works