added json support, CLI + node package