added whitelist check