modified whitelistGen