Return a factory instead of constructor