Added a confirm

Added confirm to ask if we need to perform the while loop.