implements structure for indexing file (not yet working)