Finalized IDU correction function