put layers into groups