refactor itohex