[NOT WORKING] Table detection + replacement