updated pig scripts