initial commit matrix_reduce