Added decToHex function to common functions