added keyboard interrapt exception handler