added a comment on each_with_index method