resizing to smaller dimensions