Renamed KK to previous_K
Renamed KK to previous_K