tiling image: fixed bugs and added overlapping