consistency checks added