change 40 to tileSize