Working group detection, updated functions