autoupdate; refactor