rendering widget refactoring