added json-mode