.each_with_index instead of .each