Added reverse function

which is broken