new version with curl