capture hex properly