basic grammar refactor