Added new window, but have bugs