handle ^D