undoing properly