extract base functionality for preprocessors to base class