European Union law is the system of laws operating within the member states of the European Union. The EU has political institutions and social and economic policies. According to its Court of Justice, the EU represents "a new legal order of international law". The EU's legal foundations are the Treaty on European Union and the Treaty on the Functioning of the European Union, unanimously agreed by the governments of the 28 states that were members at the time. New states may join the EU, if they agree to operate by the rules of the organisation, and existing members may leave according to their "own constitutional requirements".