Added updating of entities and test