switch to left recursion