widgets refactoring