G : changed word-group logic