json refactor