forgot that maxsize needs to be one greater than the maxsize due to the first row and column