Changed the while-do, to just while loop initialized as false