Created the createAllDatasets function in merge_data