number extracting method updated