lagit reverse function