fixing new window declaration