complete permutation matrix mult impl, add docs