changed lines in pins_controller.rb