add toJSON and fromJSON to Homer