collection of code for inverted index blog