modified the script