complex search implemented