added json writer