Creating cohorts

refactor into one method