use json_decode properly