fixed recursion in codeDict