Write a second version of reverse without using dereference