Adding the reverse function