build_window to separate function