calling getEntities