added keyboard interrupt exception