updated curl script