add \q command to close window