more general number parsing