Try using a functional base class