make resizing cleaner
remove debug code