trying to implement matrix-multiplication