switching back to nth so that i can set the value of an invalid cell to 0