improved SplitCpp() without using rbind()