modified control.sh