wrote my own hex printing code