started adding parameter to allow json or list output, #18