is now working when running in a window