refactoring WindowSupport