Write queue after connect windows

should i immediately initialize the variables, or just do a variable decleration and an initialization later on.