changing to api_ref_call  function call