simplify pins_controller.rb