changed to retrieveAndRemoveCategories