expanded the factory to an abstract factory