add code for entity consistents