updated to include a json dump and read (so that the initial read doesn't need done repeatedly)