Add function to update parent data with data of different categories