handle new format of json input