switching over to hdf5
events now write correctly
build_db now works