should we use an instance variable for window?