Change whitelist to use Set instead of array.