finalized resizing the images