implemented square tile generation