better json output support