updated curl.js structure