define until and createCodeTree.