shouldn't this use json_decode?