Add simple factory pattern