added math implementation of simple curve