creating FactoryMethod