telephone number algorithem