Modified controller.sh