updated KT code