add private methods to application_controller.rb