trying to json encode results from server