Modify factory and test