modified for gen json