changed json parsing