added json parsing