further optimized isInGroup + tests