rework patterns & tests for whitelist