commented undoWork function