filter out duplicates from the list of categories