added cubic curve support