matrix join apply ##