minor tweaks to script