# Drawstep engine · Statics & layers · `controlWhileSearching` > Control while searching — CR 722.2, 722.5, 701.23 (Opposition Agent): "You control your opponents while they're searching their libraries" — the source's controller makes the choices of each search these players make of their own library (which cards they find, within the instruction; a search for a stated quality may find nothing, CR 701.23b). With several such sources, the most recently entered one applies (CR 722.1a). Engine: Magic: The Gathering (`mtg`). This is one primitive of the Drawstep card vocabulary; field names and the discriminator are exact. Wiki page: https://drawstep.xyz/wiki/mtg/statics#controlWhileSearching ## Where it goes The `effect` of a static ability (or one of its `effects`): `{ "kind": "static", "effect": { "type": "controlWhileSearching", … } }`. Applied continuously through the layer system. Printed words that point here (search aliases): you control your opponents while they're searching their libraries opposition agent. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `who` | `"you" \| "controller" \| "abilityController" \| "sourceController" \| "owner" \| "eachOpponent" \| "eachPlayer" \| "target" \| "triggeringPlayer" \| "defendingPlayer" \| "attackingPlayer" \| "activePlayer" \| "re …` | yes | The players controlled while they search their own libraries (eachOpponent) | ## Minimal form ```json {"type":"controlWhileSearching","who":"you"} ``` The engine reads that minimal form as: “you control you while they're searching their libraries”. ## Related - [Statics & layers](https://drawstep.xyz/wiki/mtg/statics.md) — the whole topic - [Values](https://drawstep.xyz/wiki/mtg/values.md) — every number kind an `amount` accepts - [Start here](https://drawstep.xyz/wiki/mtg/start.md) — the rules, the output contract and the index of every primitive