Make the matrix moltiplication modular.