pig scripts using defined UDFs