modified control and setup script