added locations to invariants too