fromJSON method provided