Added undo and simulate