code to create hdf5 dataset