simplifying the whitelisting check