Tested reverse function