 With the support of local judicial departments and bureaus, the ministry was charged with supervising personnel management, training, and funding for the courts and associated organizations and was given responsibility for overseeing legal research and exchanges with foreign judicial bodies.The 1980 Organic Law of the People's Courts (revised in 1983) and the 1982 State Constitution established four levels of courts in the general administrative structure.Judges are elected or appointed by people's congresses at the corresponding levels to serve a maximum of two five-year terms.