reformatted code after resizing