trying to make it work with curves other than A, A1 and E