added new window if statement