functioning cohortMetrics scripts