connected window creating function