update maxsize minsize