changes to Factor.java