added a factory base class