use each.with_index

ruby can use each.with_index(#{index number})