Added "Enter 'q' to exit" function