Add function to build parent_data