added json_encode. Derp.