undo test purpose code