refactor byteArrayToHex()