deal with circular recursion.