adding missing fields and invariants