I added a give up thing and while loop.