add group select by trait values and names