(if maxsize is the maximum integer, of course!)