public boolean createFactoryClass(SootClass cl){
		String classname = cl.getName();
		String fact = classname+"Factory";
		Chain<SootClass> classes = Scene.v().getClasses(); 
		if(!classCreationAllowed(classes, fact)){
			return false;
		}
		
		SootClass c = new SootClass(fact, Modifier.PUBLIC);
		c.setSuperclass(Scene.v().getSootClass("java.lang.Object"));
		c.addInterface(factory);
		//c.addInterface(factory);
		Scene.v().addClass(c);
		
		//add init() method
		
		SootMethod init_m = new SootMethod("<init>",  new ArrayList<Type>(), VoidType.v(), Modifier.PUBLIC);
		c.addMethod(init_m);
		JimpleBody body = Jimple.v().newBody(init_m);
		init_m.setActiveBody(body);
		
		Local this_local = Jimple.v().newLocal("this_ref", RefType.v(c));
		body.getLocals().add(this_local);
		ThisRef this_l = Jimple.v().newThisRef(RefType.v(c));
		
		body.getUnits().add(Jimple.v().newIdentityStmt(this_local, this_l));
		body.getUnits().add(Jimple.v().newInvokeStmt(Jimple.v().newSpecialInvokeExpr(this_local,Scene.v().makeConstructorRef(Scene.v().getSootClass("java.lang.Object"), new ArrayList<Type>()))));
		body.getUnits().add(Jimple.v().newReturnVoidStmt());
		
		//add createPoolObject() method - should be overloaded for overloaded constructor cases??
		SootMethod cpo_method = new SootMethod("createPoolObject",  new ArrayList<Type>(), RefType.v(poolObj), Modifier.PUBLIC);
		c.addMethod(cpo_method);
		JimpleBody cpo_body = Jimple.v().newBody(cpo_method);
		cpo_method.setActiveBody(cpo_body);
		
		Local fact_l = Jimple.v().newLocal("factory",RefType.v(c));
		Local poolObj_l = Jimple.v().newLocal("poolObj", RefType.v(cl));
		cpo_body.getLocals().add(fact_l);
		cpo_body.getLocals().add(poolObj_l);
		
		cpo_body.getUnits().add(Jimple.v().newIdentityStmt(fact_l, Jimple.v().newThisRef(RefType.v(c))));
		cpo_body.getUnits().add(Jimple.v().newAssignStmt(poolObj_l, Jimple.v().newNewExpr(RefType.v(Scene.v().getSootClass(classname)))));
		cpo_body.getUnits().add(Jimple.v().newInvokeStmt(Jimple.v().newSpecialInvokeExpr(poolObj_l, Scene.v().makeConstructorRef(cl, cpo_method.getParameterTypes()))));
		cpo_body.getUnits().add(Jimple.v().newReturnStmt(poolObj_l));		
		
		return true;
		
	}