Fiddled around with the break condition in the while loop