generalized/HDF5ized read and write methods. these methods can now be found in main.jl