removed old invariant check