refactor jsonresults