add javascript to find group winner