Making the confirmation pop-up a helper method