removed the resultmatrix from code
moved to Matrix/cBind