before change to flat groups