added invariant