implement inverted indexing
a