split to groups