wrote json parsing code