implement modification of entities and save when checking dirtiness