Modified pin.rb and user.rb