another set of refactored grammar