refactored to make each cell a tuple

each tuple contains the cell's index and state. this is to be able to
re-order after the fact when this gets distributed.