adding some exception and inheritance codes
adding Hex2Dec