get the json output working too