improve json-ification