edited the script for clarification