optimize the grammers.