added json + curl code