restore the calculation of the number of across words and down words