#20 duplicate code by abstracting base class