resizing and optimizing all