added renderTile method