The 3 federal territories were formed for different purposes: Kuala Lumpur is the national capital, Putrajaya is the administrative centre of the federal government, and Labuan serves as an offshore financial centre. Kuala Lumpur and Putrajaya were carved out of Selangor, while Labuan was ceded by Sabah. The territories fall under the purview of the Ministry of the Federal Territories, and the Parliament of Malaysia legislates on all matters concerning the territories. Each federal territory elects representatives from single-member constituencies drawn based on population to the "Dewan Rakyat" (House of Representatives) of the Parliament. The Yang di-Pertuan Agong appoints senators to represent the territories in the Dewan Negara; Kuala Lumpur has two senators, while Putrajaya and Labuan each has one.