removed row and col as size is enough.
removed more rowcols and cleaned up counter variable names
removed last rows and cols, checked with grep