changed json_decode to object