printidx prints the index