while loop to search for address brought back