changed apply to rowSums