add subcategories and corresponding parentIDs