generalize the whitelist scheme