now checking also if it is a hex or octal number