a hopfully working version that now contains all the data correctly