Reworked phone number recognition algorithm