master

idenity-state added to entity model
tricky condition :)