pressing 'q' quits the program