added binary search of index file