added KeyboardInterrupt exception