supporting keyboard interupt