added checking for curve creation