resizing images sanely this time