matrix_product almost finished