conencted numbers verification first implementation