function to change number of rows/collumns