Created convert-hex function.