parseJson method modified