handled the big M for cusp