More efficient check on last ten digits