added indexing to pig script