code working. cohort and gender counter. incomplete