add upgrade script. small tweaks