add the function of saving all the parameters into a HDF5 file