filling in rows and columns in case less than 20 and 10