use curl instead of open-uri