added containment feature for grammar