modified app/controllers/pins_controller.rb