upgraded to Pig 0.12.1 and built module to write UDF