code refactoring, widget annotation