refactored the sort by cohort date