Why not use `each_with_index` ? (http://ruby-doc.org/core-1.8.7/Enumerable.html#method-i-each_with_index)