add assert module for invariant checks