edited def in pages_controller.rb