<P> In fiscal year 2017, it was allocated a net discretionary budget of $40.6 billion . With more than 240,000 employees, DHS is the third largest Cabinet department, after the Departments of Defense and Veterans Affairs . Homeland security policy is coordinated at the White House by the Homeland Security Council . Other agencies with significant homeland security responsibilities include the Departments of Health and Human Services, Justice, and Energy . </P> <P> The former Secretary, John F. Kelly, was replaced by Secretary Kirstjen Nielsen on December 5, 2017 . </P> <P> Whereas the Department of Defense is charged with military actions abroad, the Department of Homeland Security works in the civilian sphere to protect the United States within, at, and outside its borders . Its stated goal is to prepare for, prevent, and respond to domestic emergencies, particularly terrorism . On March 1, 2003, DHS absorbed the Immigration and Naturalization Service (INS) and assumed its duties . In doing so, it divided the enforcement and services functions into two separate and new agencies: Immigration and Customs Enforcement and Citizenship and Immigration Services . The investigative divisions and intelligence gathering units of the INS and Customs Service were merged forming Homeland Security Investigations . Additionally, the border enforcement functions of the INS, including the U.S. Border Patrol, the U.S. Customs Service, and the Animal and Plant Health Inspection Service were consolidated into a new agency under DHS: U.S. Customs and Border Protection . The Federal Protective Service falls under the National Protection and Programs Directorate . </P> <P> The Department of Homeland Security is headed by the Secretary of Homeland Security with the assistance of the Deputy Secretary . The Department contains the components listed below . </P>

What is the function of the department of homeland security