not using reverse_iterator