windows in main thread only