some widget refactoring