Updated the evaluation for prefix groups than prefixes