Added reverse function.