private boolean isFinished(Algebra algebra, SolveFor solveFor) {
		switch(solveFor) {
		case SOLVE:
			return algebra instanceof Equation && isSolved((Equation) algebra);
		case SIMPLIFY:
			return  algebra instanceof AlgebraicParticle && isSimplified((AlgebraicParticle)algebra) || algebra instanceof Expression && (isFirstDegreeExpression((Expression) algebra));
		case FACTOR:
			return algebra instanceof Term;
		default: return false;
		}
	}