public void Append(string s)
{
//Console.WriteLine ("APPENDING {0} head={1} tail={2}", s, head, tail);
history[head] = s;
head = (head + 1) % history.Length;
if (head == tail)
tail = (tail + 1 % history.Length);
if (count != history.Length)
count++;
//Console.WriteLine ("DONE: head={1} tail={2}", s, head, tail);
}