added a ctrl-c intercept