model widget refactoring