add leaving and joining to groups