refactoring widget parameters