add correct sub window creation