added whitelist
added whitelist logic