templated curve
removed redundant nan handling
updated submodules