Implemetation of UDP search alorithm