modified the changeGroupName function to make sure the user is not going to create the same group twice