through `each_with_index` you should be able to get rid of the i variable