Judge Advocates serve primarily as legal advisors to the command to which they are assigned. In this function, they can also serve as the personal legal advisor to their commander. Their advice may cover a wide range of issues dealing with administrative law, government contracting, civilian and military personnel law, law of war and international relations, environmental law, etc. They also serve as prosecutors for the military when conducting courts-martial. In the United States military, they are charged with both the defense and prosecution of military law as provided in the Uniform Code of Military Justice. Highly experienced officers of the JAG Corps often serve as military judges in courts-martial and courts of inquiry.