complete PigClasser, ready for refactoring