adds getting last group
adds selecting group