Added a custom invariant class