put in catch for K=0