Wrote fromJSON and toJSON, still need to test