more efficient matrix multiplication -- approx. 10 x speedupgit diff