Hook up revert function