algorithm for search in seed file