fixing up json, adding converter functions