moved autoupdate to functions