minor tweaks on script