added ctrl+c handling on quit