added indexPage method for indexing a page