display function produces a window