Refactoring: separate confirm_or_cancel