update with .each_with_index