save widget refactoring