updated json saving method