updated external interface cURL code