add a consistency check