Added set window function.