first curve implementation