work on json marshalling