generic update script