handle two different types of number formats