added json output option