refactoring autoupdate