Move common logic into base class