Added function to read to hdf5