added document write of json