more solid json parsing