switch api call to civicrm_api3