updated some logic, made user interaction easier by allowing user to type 'quit' to quit