further improvements in scripts