made update K function correctly
merged