function of a window - Search