added  arguments to generalize toggle X grammar