generating tile grid