got indexing working, now to work out a binary search of the file.