discovery: support size para

move this line above line 65?
because it is only used in line [65, 69].