updated entitlements generator to use set and thread to speed up