various changes to the script