added image grid scaling