Thailand is a constitutional monarchy with the monarch as the head of state. While almost every government since 1932 has accepted constitutional authority, the country has had 17 constitutions, the most recent drafted in 2007. All of these documents have provided for a National Assembly with a prime minister as head of government. Power is exercised by the bicameral National Assembly, the Council of Ministers, and the courts in accordance with the provisions of the constitution and laws passed by the National Assembly. The constitution of 2007 (largely based on that of 1997) provides for the direct election of members of the lower house of the Assembly, the House of Representatives, to four-year terms, five-sixths from single-member districts and the remainder based on proportional representation from the political parties. It also requires the prime minister to be a member of the House of Representatives. Members of the upper house, the Senate, are directly elected to six-year terms. Legislation originates in the House of Representatives, but it can be modified or rejected by the Senate.