Update factory.php