the start of the auto-update code