working on json encoder/dump