calculating rows now takes modulus into account