Update historyController.php