tidy up dataset loading