updated the way flat_cohort_table is loaded