Update factory.class.php