Added consistency simulation code