Create factory pattern implementation2