handles keyboard interrupt now