[Added] Undo method
[To do] Check and refactor code if needed