extract render_tile
refactor