add consistency checks