added image resizing