Source code for KRE