adding group names and joining groups to work in db