update with groups function and new ui