began implementing the precedence table logic