add autoupdate, complete most function