modified not to use h5save.cpp