State machine notes