Adjusted pin.rb