removed newWindow() function.