added json output and echoing of params