refactor quit method, add capitilized letter support