updated ApplicationController.php