optimization for match from whitelist