more json insertion code