coding polling.rb