working code in JSON format