wrote whitelist method