now works with H5::Group objects in addition to files