adds quantity to groups