writing plan B autonomous mode