Changed Autonomous code for State competition