Changed while to loop, added break when q/Q is entered