corrected telephone checker function