game loop fixed

loop now makes sure a valid command is entered before continuing