still working on writing/reading index byte file