using curl as alternative if it exists