Tweaked getCohortByProfileId()