Updated placement of json function

untested yet, lol