added the ^C hook to the run method