Most of the modulo stuff works except for (a) setting the sequence numbers as mod 8 and (b) fetching the right one to start with.... I'm scared!  Thus, committing.