deleted maxsize and minsize
removed unused code