made matrix multiplication work