added the  wanted empty line at end
refactored to use rows and columns