upgrading the grammar