Convert this to a factory