Adding the matrix join functions