implemented invertedIndex.ml