big update, now uses curl