get_entities changed to return just entities with categories