added some code, but still need to deal with checkpoint filenames