Edited pig script