converts hex to decimal