closely linked to espionage or gathering of intelligence. Embassies are bases for both diplomats and spies, and some diplomats are essentially openly acknowledged spies. For instance, the job of military attachés includes learning as much as possible about the military of the nation to which they are assigned. They do not try to hide this role and, as such, are only invited to events allowed by their hosts, such as military parades or air shows. There are also deep-cover spies operating in many embassies. These individuals are given fake positions at the embassy, but their main task is to illegally gather intelligence, usually by coordinating spy rings of locals or other spies. For the most part, spies operating out of embassies gather little intelligence themselves and their identities tend to be known by the opposition. If discovered, these diplomats can be expelled from an embassy, but for the most part counter-intelligence agencies prefer to keep these agents in situ and under close monitoring. The information gathered by spies plays an increasingly important role in diplomacy. Arms-control treaties would be impossible without the power of reconnaissance satellites and agents to monitor compliance. Information gleaned from espionage is useful in almost all forms of diplomacy, everything from trade agreements to border disputes. Resolution of problems Various processes and procedures have evolved over time for handling diplomatic issues and disputes. Arbitration and mediation Nations sometimes resort to international arbitration when faced with a specific question or point of contention in need of resolution. For most of history, there were no official or formal procedures for such proceedings. They were generally accepted to abide by general principles and protocols related to international law and justice. Sometimes these took the form of formal arbitrations and mediations. In such cases a commission of diplomats might be convened to hear all sides of an issue, and to come some sort of ruling based on international law. In the modern era, much of this work is often carried out by the International Court of Justice at The Hague, or other formal commissions, agencies and tribunals, working under the United Nations. Below are some examples. The Hay–Herbert Treaty was enacted after the United States and Britain submitted a dispute to international mediation about the Canada–U.S. border. Conferences Other times, resolutions were sought through the convening of international conferences. In such cases, there are fewer ground rules, and fewer formal