switch statements added to groupCriteria