changed the categories to be a map instead of an array