script tweaks and additions