untested code for auto-update