add groups, fix events