Changed the initial value for K