Carolyn's Nim class