changed each_with_index TO each.with_index(1)