toHex and fromHex working