pull if generation logic to super class