doctest works for 3 phases.  phases can be written as range(3) or xrange(3).