added base code for json parsing