EXPLOITING UNEXPECTED SITUATIONS IN THE MATHEMATICS CLASSROOM

The professional development of mathematics teachers needs to support teachers in orchestrating the mathematics classroom in ways that enable them to respond flexibly and productively to the unexpected. When a situation arises in the classroom which is not connected in an obvious way to the mathematical learning intentions of the lesson, it can be challenging for the teacher to improvise so as to craft this situation into an opportunity for doing and learning mathematics. In this study, as teacher-researcher I maintained a record of unexpected situations as they arose in my own secondary mathematics classroom. Details are given of four unexpected situations which I found ways to exploit mathematically, and these are analysed to highlight factors which may enhance a mathematics teacher’s preparedness for dealing with the unexpected. The results of this study indicate that deviating from the intended lesson to exploit an unexpected situation in which students have shown some interest can lead them into enjoyable and worthwhile mathematical engagement.


INTRODUCTION
The mathematics classroom can be a complex and dynamic place in which unexpected situations may take even an experienced teacher by surprise. For Brookfield (2006, pp. xi-xii), teaching is "full of unexpected events, un-looked-for surprises, and unanticipated twists and turns". He insists that "the one thing teachers can expect with total confidence is uncertainty" (p. xii). While this never-a-dull-moment aspect of teaching might at times be stimulating, it can also present the teacher with major challenges. Finding ways to help the mathematics teacher handle the unexpected so that students' learning of mathematics is enhanced constitutes a focus for research in initial teacher education and teacher professional development.
An increasing body of research, particularly over the last 10 years, has addressed mathematics teachers' contingent behaviour in the classroom (Chick & Stacey, 2013;Mason & Davis, 2013;Rowland, Huckstep & Thwaites, 2005;Rowland & Zazkis, 2013;Sawyer, 2004;Towers & Davis, 2002). The challenge of responding to unexpected mathematical comments from students has been categorised as an instance of applied mathematics, where the application happens to be pedagogical (Chick & Stacey, 2013), but others have argued that teacher intuition is more important in such circumstances than rational problem solving (McMahon, 2003). For Rowland & Zazkis (2013), contingency "is witnessed in teachers' responses to classroom events that were not anticipated or planned, usually triggered by an answer or a remark contributed by a student" (pp. 138-139). Their recent study (ibid.), like most others on contingent teacher behaviour, focuses on unexpected mathematical situations that arise out of mathematical comments made by students within a planned mathematical task, and how the teacher makes a mathematical response.
The mathematical or non-mathematical nature of both the interruption and the teacher's response might be considered in a two-way table (Table 1), in which studies such as Rowland & Zazkis's (2013) would be assigned to the top-left cell. Responding to a mathematical interruption non-mathematically, such as by asking the student to be quiet, might be regarded as a missed opportunity (top-right cell). (However, the opportunity might merely have been set aside by the teacher, who decided that it would not be appropriate to pursue it at that particular moment.) Non-mathematical interruptions (depicted in the lower half of the table) are also a common classroom occurrence; if responded to nonmathematically, the encounter might be categorised as lying within the domain of non-subject-specific behaviour management (bottom-right cell, Foster, 2007). However, non-mathematical interruptions that are responded to mathematically (bottom-left cell) have, up to now, received little research attention.
It seems likely that if mathematics teachers can improve their ability to exploit unexpected non-mathematical situations mathematically, they will assist students in their learning of mathematics while also granting them a greater sense of autonomy over the direction of the lesson. Seeing how something unforeseen can be interpreted mathematically may help students to appreciate the relevance of mathematics to the real world and contribute towards creating a classroom culture that embraces the unexpected. By extracting from such unexpected situations, or bringing into them, a relevant task of mathematical value, the teacher capitalises on the hidden potential. This unplanned-for learning could be an opportunity to show a powerful application of previously learned material or address a topic in a more interesting way than the teacher might have been able to think of beforehand. Such improvisation in the moment requires the kind of teacher expertise that Mason & Davis (2013) refer to as "knowing-to act": "What matters is what actions come to the surface, either resonated metaphorically or triggered metonymically, in the moment" (p. 187). This classroom-based study seeks to identify ways in which an experienced teacher turns or hijacks unexpected non-mathematical situations to exploit them for some mathematical benefit. It also seeks to uncover factors that can assist mathematics teachers in doing this.

IMPROVISATION
In recent years, researchers have increasingly acknowledged the complex and dynamic nature of the mathematics classroom (Davis & Simmt, 2003;Davis & Sumara, 2005;Davis, Sumara & Luce-Kapler, 2008;Davis, 2009). Davis & Sumara (2004, p. 29) advocate a complexity science view of teaching as "improvisation, invention, and imagination" and use the term "occasioning" to denote the emergence of exciting possibilities from a mix of deliberate and accidental intentions. Davis (2009, p. 170) describes "complexivist teaching" as not "prescriptive, detached or predictable. It can't expect the same results with different groups. It can't assume that complex possibilities will in fact emerge." While Davis & Sumara (2005, p. 461) repeatedly caution that emergent activity cannot be controlled or "orchestrated" into existence, they do believe that teachers can prepare meaningfully for mathematics lessons. Towers & Davis (2002, p. 337) advise that lesson plans "should not be framed in terms of trajectories, itineraries, or blueprints, but as exercises in anticipation. The lesson plan is an event of preparation, not prespecification." Even in traditions such as Japanese lesson study, where teachers devote considerable thought to anticipating student responses in minute detail, and planning for consequent teacher interventions (Fernandez, 2004), it is clear that this can only minimise, not prevent, the occurrence of the unexpected. It follows that, as Remillard (1997, p. 6) remarks, "all teaching involves improvised or on-the-spot decision making". Since unexpected situations are inevitable, it is pragmatic to seek to exploit them. When this can be done regularly with some degree of confidence, unexpected events might even come to be regarded as desirable. A prevalent metaphor in the mathematics education literature for teachers' handling of the complex uncertainties inevitable in the classroom situation is jazz improvisation. For Davis (2009, p. 170, original emphasis), "teaching informed by complexity science might be described as a sort of improvising in the jazz music sense of engaging attentively and responsively with others in a collective project." Responding mathematically in the moment to the unexpected and integrating it into a coherent lesson maximises the opportunities provided by students' actions. The jazz metaphor has also been deployed by Tanner, Jones, Beauchamp & Kennewell (2010, p. 553), who suggest that a mathematics lesson can "range from a highly controlled and preplanned 'classical' style of orchestration to a range of more improvisatory orchestrations, more characteristic of the jazz genre". They "would like to encourage more jazz like performances involving spontaneous improvisation and the critical application of learning to novel contexts", seeing this as an empowering move for the students and commenting that "It may be that until this emphasis is changed, pupils will be largely restricted to playing someone else's tunes" (ibid., p. 553). Here, the notion of improvisation is explicitly applied to the students, a key feature of jazz improvisation being that the entire group responds together and jointly determines the direction of movement. Likewise, Griffiths (2007, p. 31) applies the jazz metaphor to students directly, urging that they "be able to improvise on a mathematical theme". Csikszentmihalyi (2002, p. 56) also develops the same metaphor, describing how situations can emerge spontaneously where "the goals and rules governing an activity are invented, or negotiated on the spot", commenting that "In many ways this is the pattern of a good jazz band, or any improvisational group".
Even those who may not have much appreciation for the genre of jazz music, and are inclined to dismiss it as "not proper music", might recognise that the unexpected is a fact of life in the classroom. It may be seen as a unwanted intrusion into a well-ordered and structured lesson, threatening to push the lesson off the rails, and consequently might be dealt with by ignoring or attempting to minimise the impact of the disruption and the time "wasted" on it. However, this is by no means the only option available. In the context of mathematical interruptions, Rowland & Zazkis (2013, p. 144) consider that "the teacher's response to unexpected ideas and suggestions from students is one of three kinds: to ignore, to acknowledge but put aside, and to acknowledge and incorporate". While accepting that there may be times when the first two of these may be appropriate, the focus in this paper is on the third: capitalising on the unexpected event-even if it is not overtly mathematical-and seeing it as an opportunity rather than simply a problem. Mason & Davis (2013) draw on Heidegger's sense of "being" as "sensitized and responsive to what emerges, informed by personal experience of mathematics, learning, and teaching" (p. 188). They conjecture that this is what enables a teacher to "be fully mathematical with and in front of students" (p. 188, original emphasis). The work described in this paper rests on a belief that being mathematical with students in this way in unexpected situations can be a means of making the most of what those situations bring, reminding students that the shared task in the classroom is to do mathematics.
Although this perspective on the complexity of the mathematics classroom highlights the value of teachers adopting an improvisational stance, it is reported that mathematics teachers frequently lack a sense of autonomy and feel uneasy about deviating too far from the lesson plan (Pelletier & Sharp, 2008;Foster, 2013a). The institutional culture within a school may discourage teachers from responding mathematically to unexpected situations. Sawyer (2004) decries attempts at teacher-proofing lessons by creating rigid scripted materials, instead advocating teaching as an "improvisational performance". In a similar way, Davis et al. (2008, p. 5) lament the fact that "Impeccable lessons are crafted and presented, but often in complete ignorance of the contingencies of the classroom." As well as systemic institutional discouragement, improvisation is frequently seen as a difficult skill for teachers to master. While the spontaneous creation of unplanned examples on the hoof would seem to be relatively common in the mathematics classroom (Zodik & Zaslavsky, 2008), more extended improvisation into completely unexpected areas is much less frequently reported. Sawyer (2004) argues that: To create an improvisational classroom, the teacher must have a high degree of pedagogical content knowledge-to respond creatively to unexpected student queries, a teacher must have a more profound understanding of the material than if the teacher is simply reciting a preplanned lecture or script. (p. 15) To a teacher not used to working in such ways, the idea of exploiting unexpected situations may be seen as threatening, just as a classically trained musician may be uncomfortable with being asked to improvise on the spur of the moment. Remillard (1997, p. 12) seeks ways to legitimate teacher improvisation in the classroom and to nurture "improvised decision making that is not haphazard or without thought, but is informed by a sense of the mathematical terrain and productive routes students might travel". This points to the value of systematic preparation, and yet, as Sawyer (2004, p. 17) points out, "Improvisational teaching requires constant decision making as routines and activity structures are modified on the fly to suit local student needs." A dramatic intrusion into the lesson, as opposed to a minor interruption, is likely to require considerable mathematical and pedagogical consideration. In some ways, perhaps more than jazz, this parallels improvisational comedy, where ideas from the audience can form the basis for entire sketches (Armstrong, 2003;Cryer, 2009;George, 2012).
Despite these difficulties, there are potentially major benefits for students if teachers can find ways of exploiting unexpected classroom situations. von Glasersfeld (1995, p. 183) considers that learning mathematics can be perceived as "fun" depending "on the teacher's sensitivity and willingness to go along with an individual student's way of thinking and, whenever possible, to involve the whole class in following and discussing the possible itinerary". He urges teachers to "use imagination rather than routine" (p. 183). Memories of school, whether drawn from the students' or from the teacher's perspective, frequently focus on the digressions and diversions from routine (Rothenberg, 1994;Walls, Sperling & Weber, 2001). There is a sense of heightened energy, drama and tension, and such moments in the mathematics classroom can be highly memorable.
In order to examine the extent to which the teacher's deviations to respond to unexpected situations are of value to the students, Csikszentmihalyi's construct of "flow" (2002) will inform some of the analysis below. Psychologists have long studied motivation and found people to be motivated to act by highly varied factors (Middleton & Spanias, 1999;Csikszentmihalyi & Csikszentmihalyi, 1988). People may be primarily motivated by the activity itself (intrinsic motivation) or by external factors (extrinsic motivation). Intrinsic motivation describes a person's tendency to seek out challenges for their own sake, as an end in themselves. For example, young children are naturally highly inquisitive and curious about the world around them and do not need extrinsic rewards to persevere in completing often lengthy and highly demanding tasks. However, later experiences, especially those in school, can act to destroy intrinsic motivation and replace it with the need for extrinsic rewards such as adult praise, stickers, sweets, examination success, etc. Csikszentmihalyi's (2002) notion of flow has become an important construct in the field of intrinsic motivation, and within mathematics education (see, for example, Sedig, 2007;Williams, 2002). Csikszentmihalyi defines flow as "the state in which people are so involved in an activity that nothing else seems to matter" (2002, p. 4). He frequently comments on the way in which those in flow "have no attention left over for anything else" (1988, p. 34). Students experiencing flow will become absorbed in what they are doing so that time seems to fly and they are surprised that the lesson has ended so quickly. The teacher might also enter a flow state, in which they are utterly consumed both in the mathematics of the situation and in the pedagogical challenges of catering for the students. For Csikszentmihalyi (2002, p. 42), "Flow is important both because it makes the present instant more enjoyable, and because it builds the self-confidence that allows us to develop skills and make significant contributions to humankind". Flow, or "optimal experience", "requires a balance between the challenges perceived in a given situation and the skills a person brings to it" (1988, p. 30), meaning that flow situations can to some extent be engineered, or at least made more likely. However, Csikszentmihalyi (1988, p. 31) comments that "Of course, no activity guarantees the occurrence of flow, because it can only provide challenges, and whether a person will enjoy that or not depends also on one's skills." It seems plausible that by successfully exploiting unexpected situations, the teacher could generate flow situations of this kind, and I will examine the evidence for this below.
In this study, I take unexpected situations to be non-mathematical circumstances that arise in the classroom that as teacher I did not anticipate and which create a major disturbance to the progress of the lesson. They do not appear to arise directly from the mathematical direction that the lesson is taking, such as unusual questions or responses to do with the topic under consideration, but appear to come from outside, having an off-the-wall character. The study seeks to develop rich accounts of an experienced mathematics teacher exploiting unexpected situations. I consider the situation to be well exploited if some mathematical meaning is brought to, or found in, the situation, leading to students working on a new mathematical task. The accounts obtained are intended to answer the three research questions: 1. What are some of the ways in which an experienced teacher of mathematics exploits unexpected situations? 2. What factors assist in enabling a mathematics teacher to exploit unexpected situations more effectively? 3. To what extent is flow (Csikszentmihalyi, 1988(Csikszentmihalyi, , 2002 a feature of these exploited unexpected situations?

METHODOLOGY
Clearly, studying how mathematics teachers make use of unexpected situations in the classroom constitutes a significant research challenge. Skovsmose (2011, p. 18) complains that the majority of the mathematics education literature focuses on the "prototypical mathematics classroom", which "reflects good order and affluence". In such stereotyped circumstances, there is a lack of disruption to the process of education: "[O]ne does not find extensive transcriptions of overtly disruptive conversations, or presentations of students whose behaviour spoils the lesson. The prototypical classroom is cleansed of 'noise'" (p. 18). In this study, the "noise" of unexpected situations, along with how the teacher responds, is exactly what I focus on, and, by definition, it cannot be engineered, so the only authentic approach to studying such situations would appear to be a potentially lengthy "waiting game" of unstructured observation. An ethnographic approach (LeCompte, Preissle & Tesch, 1993) was taken, involving the teacher-researcher teaching normal classes, consisting of a wide range of mathematics students from age 11 to 16 in an urban UK secondary school, over a 12-month period. The intention of the study was to attempt to recognise and become articulate about the "craft knowledge" (Leinhardt, 1990) that teachers develop in their everyday working lives. By researching my own practice, I am seeking to bring this "tacit knowledge" (Polanyi, 2009) to the surface and articulate, analyse and critique it so as to make it available for others. Such intuitive knowledge (Atkinson & Claxton, 2003) can be hard to access. As Claxton (2003) comments: The expert teacher may go through a whole lesson, adjusting or even abandoning their actions and intentions as they go, without being conscious of much reasoning, and without being able to say why or how they made the 'decisions' they did, or to what clues they were responding. (p. 35) For this reason, it was judged advantageous to combine the teacher and researcher roles in order to seek an inside account. Indeed, in practice, the necessity of waiting through a large number of lessons for rare, unexpected situations to occur ruled out the possibility of a separate observer. There was also concern that the intrusion of an outsider into the naturalistic setting of the classroom might inhibit the spontaneous occurrence of exactly the kind of free, unexpected situations that were the desired object of study.
The approach taken was to audio record speculatively a large number (n ≈ 150) of the teacher-researcher's lessons over the 12-month period of the study. Four of these lessons were identified by the teacher-researcher during the lesson as ones in which unexpected situations had arisen, and field notes were made during and immediately after each of them in order to generate rich data. These were expanded on in post-lesson same-day reflections as soon as practicable. These four lessons provided the data for this study and represent the only selection that took place. At no point did the teacher-researcher consciously seek to force any situation to present itself; indeed, through most of this time the teacher-researcher was not particularly focused on the research questions associated with this study, and the recordings of the other lessons were used for other research purposes or were discarded immediately after the lessons.
Analysis of the data from the four lessons proceeded in parallel to each other, but as common themes emerged the data was returned to so that these could be tested in the other lessons. The intention throughout was to be open to whatever might emerge from the data. Mason's "discipline of noticing" (Mason, 2002) formed a framework in which to try to capture both an "account of" what students said and did along with a complementary "account of" what was said, done and thought at the time by the teacher-researcher. Such descriptions attempt to avoid evaluative comments and to be as objective as possible (Mason, 2002, pp. 39-53). Subsequent reading of the accounts, alongside listening to the audio obtained, assisted reentry into some of the experiences of the lesson, allowing deeper reflection and tentative "accounting for" what had taken place (Mason, 2002, pp. 40-42).
Accurately noting thoughts and motives after the event is notoriously difficult, and when possible the teacher-researcher made brief notes during the lessons immediately after noting the emergence of an unexpected situation. In all four lessons, the teacher-researcher was able to note a small amount of detail on paper during the lesson, and in each case this was extended shortly afterwards in an attempt to obtain thick descriptions (Geertz, 1994). Such an approach to generating data is not without its problems. As in all qualitative research, there is an element of idiosyncrasy about observations in the complex setting of a classroom, yet this same difficulty makes the data potentially rich and amenable to thoughtful analysis. The excitement felt when an unexpected situation did occur made it difficult, at times, to balance the needs of responding and recording, and for ethical reasons priority each time was given to managing the classroom in the best interests of the students, recording being a secondary objective.
In the post-lesson notes, compiled in conjunction with the audio recordings, the teacher-researcher sought to identify the following: The words or actions with which unexpected situations began (e.g. the words spoken by the student or the physical occurrence taking place); The words or actions with which the teacher-researcher initially responded; The extent to which the episode seemed to be engaging the whole class or just a few individuals, and the evidence for this; The thoughts (so far as they could be captured) that went through the teacher-researcher's mind at the time; The actions taken by the teacher-researcher that led to the first steps in beginning to respond to the situation; The length of time before the usual socio-mathematical classroom norms were re-established, which was taken to indicate the "end" of the situation.
During post-lesson reflection, it was often easy to design "better" responses, but these armchair re-thinkings are not recorded, since the purpose of the study was to note the actions taken there and then, in the thick of it-adaptive expertise in task design (Berliner, 2001).
According to Csikszentmihalyi's (1988Csikszentmihalyi's ( , 2002 theory of flow, key signs that a flow state has been achieved include an intense concentration on the present activity, a sense of personal agency over it and an experience of the activity as being intrinsically rewarding. In the analysis, the accounts of the four lessons were examined for evidence of these features, both in the teacher and in the students.

RESULTS
The four unexpected situations are described below in chronological order.

Haircut
At the beginning of a year 7 (age 11-12) lesson (n = 27), just as the teacher-researcher was about to begin, a boy at the back of the classroom called out: "Sir, have you had your hair cut?" There was an immediate stir in the classroom, as the noise level suddenly dropped and there was a sense of tension as all eyes fell on the teacher-researcher to see how I would respond. I replied, in a mock-worried tone: "No, it all just fell out by itself." Some students near the front laughed but not all seemed to realise the joke, one commenting, apparently seriously, that this was like his dog, which was moulting. I reassured the class that I was joking and then, as the class seemed still engaged by this exchange, I asked: "Hey, do you think there could be two people in the room with exactly the same number of hairs on their heads?" Some immediately called out "No way!" and I suggested that they discuss this question in pairs.
It was at this moment that I recalled noticing that an "unexpected situation" had arisen, as this study was not in my mind at the start of the lesson. I made a brief note about the exchange and then wrote the following questions on the board: Could there be two people in this room with exactly the same number of hairs on their heads? What about in the whole school? What about in the whole world? I noted after the lesson: This is a well-known problem that I had read about before, in the context of the 'pigeonhole principle', but it did not seem to be familiar to any of the students in the class. Since the estimated maximum number of hairs on a human head is fewer than the total population of the planet (of New York, even), it is necessarily the case that at least two people in the world have exactly the same number of hairs on their heads-although locating such a pair would be somewhat tricky! Although I was familiar with the problem, I could not remember using it with a class, but it seemed that the opportunities for estimation and logical thinking could make this a worthwhile task. I could have used it any day, but [the student's] question seemed to provide an excuse-an opportunity-to do so.
There were indications of student excitement and uncharacteristically intense concentration on the problem, with no one asking why we were working on it. These would seem to signal a significant degree of flow in the students. I also found myself completely absorbed in what was going on. Some students did not believe that the number of hairs on a human head was, even in principle, countable. (This seemed to relate to biological ideas of continuous growth: new hairs would grow and old hairs would fall out faster than you could count them.) Some talked about "infinity", which not all regarded as a "number". Some thought that bald people would have exactly zero hairs, and since there is more than one bald person in the world that would satisfy the conditions, but others did not feel that "bald" meant absolutely no hair. Even so, if all bald people had fewer than a certain small number of hairs, then provided that there were more than that number of such people, at least two would have to have the same number of hairs. Enthusiastic discussion proceeded along these lines for about 10 min and then I resumed with the material with which I had originally intended to begin the lesson.

Power Cut
While teaching a year 10 (age 14-15) class (n = 25), the classroom lights and electronic whiteboard/data projector suddenly went off as a result of road maintenance workers cutting through a cable. It was a UK winter's day, so with no electricity it was dark and would also become quite cold. Several students quickly saw potential in the situation, saying "We can't see, so we can't do any work!" and "If it gets too cold we'll have to be sent home-legally they can't keep us here if it gets below 10°!" This time I noticed straight away that an "unexpected situation" had arisen. I noted afterwards: I remember thinking that if they could take advantage of the situation, why couldn't I? I fumbled feebly with the electrics, but it was fairly clear that there was nothing that I could do to restore the power. I quickly realised that if it did not come back on within a few moments then it could well be off for the rest of the lesson and that this could be an opportunity to attempt to harness the situation mathematically.
I invited the students to work in pairs, one imagining a shape and describing it to the other using words only ("Sit on your hands"), and the other having to make a drawing of it. After a few minutes, an additional instruction was given that the second person was not allowed to speak. The power did not return until after the end of the lesson, and I continued these activities for about 20 min, until the lesson concluded. There was some evidence of enthusiastic participation by the students, but much less than with the "Haircut" lesson and although students were engaged in the task, signs of flow were limited to a minority of the students.
I noted my reason for instigating the task: As it happened, I had recently read an article (Hoftstadter, 2007) about Jakob Steiner (1796-1863), who is said to have deliberately taught geometry lessons in the dark in order to provoke his students into better mental visualisation. This was a familiar and 'safe' task for me, but not one that I had planned to use that lesson.

Tin of Sweets
Just as my year 9 (age 13-14) class (n = 15) was about to enter the classroom, two student teachers working in the school, on the last day of their placement, arrived and gave me a large tin of sweets to share with all of the classes that they had worked with. The first year 9 student who entered the room saw the tin and asked "Are there any sweets in that?" I said nothing but opened the lid to reveal a full tin and subsequent students who entered made excited noises as they saw it. Each student took one as they sat down, but the removal of 15 sweets did not seem to make much impact-the tin still appeared "full". The dialogue (with students' names as pseudonyms) proceeded as follows: David: How many can we have? Teacher-researcher: There might be enough for you to have another one each. We've got to leave enough for the other classes. A student suggested examining the tin to see if there was an "average contents" anywhere, but there was not, not even on the bottom, which students tried to check without spilling the contents. Anna: How many other classes are they for? Teacher-researcher: Three.
David: There's loads. There's plenty for us to have at least another one each, maybe two. Teacher-researcher: I'm not sure. Charlie: How many are there in each class? Teacher-researcher: I don't know.
I commented afterwards: I was aware at this point of beginning to be 'deliberately unhelpful'. The conversation was developing mathematically, and I didn't want to make it too easy for the students. I was also conscious of stalling for time, while I tried to think what mathematical potential there could be.

The situation continued:
Simon: Come on, you're a maths teacher: can't you work it out! [laughter] Teacher-researcher: I don't think it's up to me to work it out. Charlie: Say there's 30 in each class. David: We need to know how much one sweet weighs. David offered to go to the science department and borrow a balance, but I said that I would rather not bother the science technicians. I noted afterwards that I "also felt that it might be more beneficial mathematically to focus on estimation rather than weighing". Sarah: Measure the tin and see how big it is. The class did this and calculated its volume (approximating it as a cylinder, 3,900 cm 3 ) and the volume of a sweet (around 14 cm 3 ), did a division and deduced that there were about 280 sweets in the tin. I noted afterwards that "there was an interesting tension in the air as this answer was obtained.
[David] expressed what I felt we were all thinking." David: No way! There's never that many in there. This was quickly followed by cries of "Shut up!", suggesting that others agreed but did not want to lose their chance to have as many sweets as possible.
I later reflected: I did not believe that there were that many either, but felt as though it would be churlish to reject their conclusion … although on reflection I think that it would certainly have been better to question some of the assumptions that we had made and take another circuit around the modelling cycle. With hindsight, I definitely regret not doing that. It could have been that had I planned to use this task I would have been better prepared for this outcome … Feeling pushed into doing this work without thinking about it in detail beforehand perhaps led to a less useful outcome in the end.
The episode lasted the entire 40-minute lesson, with some students expressing surprise, which I shared, that the end of the lesson had come so quickly. Csikszentmihalyi (1988, p. 33) comments that a "common feature of flow experiences is a 'distorted' sense of time. When consciousness is fully active and ordered, hours seem to pass by in minutes, and occasionally a few seconds stretch out into what seems to be an infinity." Along with the high degrees of engagement shown by the students in the discussion and activity, with intense involvement and sustained interest, this points to strong evidence of flow for them, as well as for me (Csikszentmihalyi, 2002).

Circles
When working with a different year 9 class (n = 27), I happened to draw a fairly good freehand circle on the electronic whiteboard. I noted afterwards: Initially, I didn't notice, being absorbed instead in the purpose for which I had drawn it, but it created a lot of excitement within the classroom, which interrupted the flow of the lesson. The quality of freehand circles had been an occasional subject of joking previously within the class, when I had drawn a good or a bad one on the board. The admiration caused me to save it and, while I was doing so, to stop and wonder how this might be developed into something mathematical for the students.
Without saying anything, I used the circle-drawing tool to draw an accurate circle on top of my freehand circle, and there was cheering and clapping when they almost coincided. Several students asked whether they could try to draw a circle, so I asked each student to come to the board and draw the best freehand circle that they could, with only one attempt each. At the same time, I asked everyone else to rate each student's circle on a Likert scale of 1 (poor) to 10 (excellent). The affordance of the electronic whiteboard software meant that all the circles were saved, and I asked each student to write their name underneath their circle. I noted afterwards: I had in mind that this would generate some statistical data, but I did not at that stage have any idea what we would do with it. I thought that I would think about it while the students were drawing their circles, as that would take several minutes. I had recently read Bryant and Sangwin's How Round is Your Circle? (2008), so was aware of some possibilities.
The circle drawing and scoring took the remaining minutes of this lesson, and as a closing question I asked: "Can we find an objective way of judging whose circle is the best that is more than just gut instinct?" A definition of "objective" was given and lots of students wanted to speak, but the lesson ended and the discussion resumed the next time. I wrote a few days later that: [the] break gave me time to plan, and I was able to book a computer room where students could examine one another's circles on screen and make any measurements that they wished. I also collected in their scores and transcribed them onto a spreadsheet, which they then also had access to in the third lesson. By the end of the third lesson, each group had produced a poster [one page from one of them is shown in Fig. 1] describing the work that they had done on determining which circle they thought was "best" and considering questions such as whether there was evidence that students had been biased towards their friends in their scoring.
During the circle-drawing phase, students seemed intensely focused on each other's drawings and on assigning scores. I was seated near the back, implying a sense of student agency over proceedings, and these factors suggest a significant degree of flow, which was also manifest at times during subsequent work on this task. I felt very "caught up" in the situation, and found the activity highly intrinsically rewarding, probably indicating the greatest degree of flow for me in all of the unexpected situations described.

DISCUSSION
The four unexpected situations described, along with my attempts to exploit them mathematically, possess certain similarities and differences, some features of which are summarised in Table 2. The discussion below is structured around these features.

How the Unexpected Situation Arose
In these four unexpected situations, the initial source of the disturbance varied and in only the first situation ("Haircut") was it a student comment alone. In "Circles", my drawing by itself would probably not have initiated the situation, and might have passed unremarked; the students' reaction of surprise and their subsequent request to have a go were instrumental in my decision to depart from what was planned. This was similar in "Tin of Sweets", as the presence of the tin on the teacher's desk might not have been remarked upon with such interest by a different class. This is in line with Rowland & Zazkis's (2013) view that contingency is usually "triggered by an answer or a remark contributed by a student" (p. 139). In all of these situations, I felt socially obliged to respond in some way to the students, whereas in "Power Cut" the interruption had entered the classroom from outside and students and teacher were together faced with the problem of what to do. In all of the Figure 1. One page taken from one student's work on determining circularity. The names of the students who drew the circles have been deleted to preserve anonymity situations except "Tin of Sweets", I quickly registered that an unexpected situation had arisen, whereas in "Tin of Sweets" a more ordinary conversation was underway and I began to direct this towards a possible mathematical task. In this regard, "Tin of Sweets" might be seen as a less authentic instance of an unexpected situation, as I felt that I played a much greater role in creating it.

The Different Teacher Responses
Here I address the first research question, concerning ways in which an experienced teacher of mathematics exploits unexpected situations. The response to "Power Cut" may be regarded as the most interventionist of the four responses, as, under the pressure of changing classroom constraints, I instigated a known task that seemed to fit the circumstances. It may be that here I felt more under pressure, with older, less motivated students who were at risk of downing tools, and I wished to rescue the situation by directing students quickly to an alternative task-coping with the unexpected situation rather than exploiting it. It seems likely that the fact that, as referred to above, the source of the disturbance was external to the classroom community played a part in this. By contrast, my actions in the other situations seem more playful and responsive to the students. This is particularly so for the "Circles" situation, where students expressed a desire to draw circles and I acceded to this, merely imposing an additional task of rating each other's drawings. My direction in this situation increased subsequently, but still had the sense of being in line with the students' expressed interest. My response to "Tin of Sweets" might also be characterised as in tune with the students' interest, although here it seems that I was conforming to a teacher role of being deliberately unhelpful, so as to place responsibility on the students to do some calculations. In the "Haircut" situation, I offered a task out of nowhere, which was related to the student's interjection but which did not naturally follow the line of the student's enquiry. This would seem to be the result for me of a metonymic trigger, an association "arising from surface resemblances" (Mason & Davis, 2013, p. 192) around hair.

Factors That Assisted the Teacher's Response
Here I address the second research question, concerning factors which assist the mathematics teacher in exploiting unexpected situations. It is clear that the range of possibilities that a teacher becomes aware of in the moment, what Mason calls having something "come to mind" (Mason & Spence, 1999), is heavily influenced by prior experiences-as Louis Pasteur commented: "Chance favours the prepared mind." Rowland & Zazkis (2013) "believe that it is extended exposure to mathematics that serves as a support structure for the teacher's willingness to conjecture, to experiment, to take risks, and to take advantage of contingent opportunities as they arise" (p. 15). I see evidence of this in this study in my references to books that had been read (twice "recently") in three out of four of the tasks ("Haircut", "Power Cut" and "Circles"). In the "Haircut" and "Power Cut" situations, I used tasks with which I was familiar, and a known task type in the case of "Tin of Sweets", in an attempt to fit the unexpected situations; this was task selection rather than task design. In "Circles", however, the reading from Bryant & Sangwin (2008) informed possible approaches to determining circularity but did not dictate a particular form of task, so this seems to be a case of improvisation leading to the creation of something new. Chick & Stacey (2013) provide rich descriptions of incidents in which mathematics teachers deviated from their plans. When Chick herself chose to allow a pre-service teacher to describe a method to the rest of the class, although Chick did not know in advance whether it would turn out to be a correct solution, she describes entering a state of flow, and Chick & Stacey (ibid.) comment that this: was only possible because of her confidence in her own mathematical knowledge: that she could embark on an uncertain mathematical and pedagogical path; that the mathematical issue would become evident and be able to be resolved; that the journey would be a mathematically and instructionally worthwhile one for the class; and, selfishly, that she would enjoy personal engagement with such a mathematical problem. (p. 132) In the unexpected situations recounted here, I was also confident in my ability to "be mathematical" in unknown situations, but it was not always the case that I believed in advance that "the journey would be a mathematically and instructionally worthwhile one for the class" (ibid., p. 132). In the "Circles" situation, particularly, I was quite unsure about the direction that this would take until after committing myself to the activity of circle drawing and scoring. Tanner et al. (2010) comment that "Jazz musicians face a challenge in balancing the risk of failure with the creative tension involved in embracing mistakes and using them to form creative new pathways for action" (p. 550). However, although the experienced jazz musician will on some occasions produce better improvisations than on others, they will almost never dry up completely or play an unintended clashing chord. Similarly, it may be that the mathematics teacher does not need to have total certainty about the direction in which they are travelling but merely a reasonable belief that they will be able to engage fairly mathematically with whatever arises. As Mason & Davis (2013) comment, "what distinguishes expert from novice behavior is the degree of complexity of awareness that can be sustained moment by moment and the richness of possible choices that come to mind" (p. 190). In each of the unexpected situations described, the possibility that came to mind might be regarded as to some extent "rich" mathematically, but I failed to think of multiple possibilities and then choose one, which might represent a more expert behaviour in these sort of circumstances. In order to act metonymically, one has to have a network of experiences and knowledge that might be triggered (Mason & Davis, 2013), and I was clearly limited by what I had available to me. Implicit in several of the accounts of the unexpected situations given above are strategies I instigated to make this way of working safer. A repeated gambit seems to have been to find a way, as soon as practicable, of giving students something to do (e.g. discussing in pairs in "Haircut", drawing and scoring circles in "Circles") which would buy me some thinking time to plan what they might do next.

Evidence of Flow
Here, I address the third research question, concerning the extent to which the students or teacher experienced signs of flow. There was good evidence of flow situations (Csikszentmihalyi, 1988(Csikszentmihalyi, , 2002 arising within at least some parts of three of the four lessons described. Students came alive relative to their manner in more ordinary circumstances, talking more loudly and more animatedly, making active suggestions and arguing with one another about mathematics. Further research would be necessary to attribute this to particular causes, although it seems likely that the personal validation of something that the student has said or done is motivating. Students may also enjoy witnessing a situation in which the teacher is clearly out of their comfort zone and improvising. There is also the potential in lessons such as "Tin of Sweets" for students to become aware of relationships between mathematics and broader aspects of the world in a context that feels more real than the typically highly contrived real-life problems prevalent in mathematics textbooks (Ward-Penny, 2010). It is unusual in UK secondary schools for students of mathematics to have more than a token influence over the course of a lesson, and the greater autonomy evident in, for example, "Haircut" and "Circles" may well have contributed to the excitement. This may also explain why evidence of flow was minimal in "Power Cut", where I imposed a new task without consultation, and the source of the contingent event did not lie with the students.

CONCLUSION
Exhorting teachers to be flexible and responsive to contingent classroom situations goes against the grain of much current teacher education and professional development (Foster, 2013b). Rowland et al. (2005, p. 263, original emphasis) describe contingency as "the readiness to respond to children's ideas and a consequent preparedness, when appropriate, to deviate from an agenda set out when the lesson was prepared". The two complementary meanings of "prepared" in this sentence nicely highlight the dual nature of being prepared (i.e. willing) to deviate from what has been prepared (i.e. planned). One fairly consistent feature of my preparedness was reading about mathematics and mathematics teaching. As Coker (1964) comments: Improvisation, like composition, is the product of everything heard in past experience, plus the originality of the moment. The contents of even a very accomplished improvisor's solos are not all fresh and original, but are a collection of clichés, established patterns, and products of memory, rearranged in new sequences, along with a few new ideas. (p. 36, original emphasis) This suggests that we should not underestimate the importance of preparing for the unexpected and helping the teacher to draw on what they already know.
As well as "knowing-to act" in the moment (Mason & Davis, 2013), mathematics teachers also need encouragement and permission to do so. This study shows ways in which unexpected situations can be exploited mathematically and highlights factors that may predispose the teacher to do this more effectively. However, it does not address the powerful cultural and institutional factors that push teachers away from using their professional judgment to adapt classroom learning to the contingent needs and interests of the students as they present themselves there and then (Foster, 2013a). However, responding to interruptions to lessons by deviating from the intended lesson to exploit an unexpected situation can lead students into intense and enjoyable mathematical engagement, such as that characterised by Csikszentmihalyi (1988Csikszentmihalyi ( , 2002 as flow. Csikszentmihalyi (1988, p. 30) has found that "flow typically occurs in clearly structured activities in which the level of challenges and skills can be varied and controlled" (p. 30). How mathematics teachers might learn to do this skilfully in the moment remains a crucial area for further research.

ACKNOWLEDGMENTS
I would like to thank Anne Watson and the anonymous reviewers for very helpful comments on previous versions of this paper.
Open Access This article is distributed under the terms of the Creative Commons Attribution License which permits any use, distribution, and reproduction in any medium, provided the original author(s) and the source are credited.