new version of matprod, fixing piped_matprod_trans2 bug