multi line search function