experimenting different algorithms when splitting colmns and rows.
port one subroutine over here.