window variable transfered to class