scrpt for convert from hex to dec and back