Added a while-loop testing function to input commands from the console