fixing pig script