initial get_ca function