refactoring pig exercises