updating the grammar