changed t(rbind(... to cbind(...