Create factory pattern implementation