working on removing left recursion