reverse function added