Move agency id into a separate variable