modified json parsing