writing automatic updater