modified to tables from div