group classes with same times function