opens window before loading