Tlanslated and translated version of KCV based on Zharay's work.