added parameter support and json output