Can this code be dispatched to a factory instead?