implementing tiles layout