added json generation