searching cycle modified