clean up the load_dataset function