Bug fix #52

finish autoupdate function see #51