Command over the U.S. Armed Forces is established in the Constitution. The sole power of command is vested in the President by Article II as Commander-in-Chief. The Constitution presumes the existence of "executive Departments" headed by "principal officers", whose appointment mechanism is provided for in the Appointments Clause. This allowance in the Constitution formed the basis for creation of the Department of Defense in 1947 by the National Security Act. The DoD is headed by the Secretary of Defense, who is a civilian and member of the Cabinet. The Defense Secretary is second in the U.S. Armed Forces chain of command, with the exception of the Coast Guard, which is under the Secretary of Homeland Security, and is just below the President and serves as the principal assistant to the President in all defense-related matters. Together, the President and the Secretary of Defense comprise the National Command Authority, which by law is the ultimate lawful source of military orders.