added some json marshalling