moved call to function that updates groups