added whitelist code