json stuff
and repackaging