adding id to groups