Modified controller.php