Added possibility to upper-bound K by hand.