added pickle support to index generator