seq search while-loop