Refactored Pig

Needed to refactor code into new function.