added json output, pretty html