Implement UNDO function for Edit Function