added hex dumping hd function