adding real factory pattern example