added code for inverted index session