fix use each_with_index