pig renderer refactored