primitive update script, not tested