replace table with spans