Replaced multiply with modulus on the right line