minor updates to clean up the script