preliminary - still has bug when loading data