starting to split out the json generation into separate functions.  just
a few state vars left plus seasons.