close to finishing left recursion