changed accepted range for rows and cols (3-40)