Added toHex and fromHex