I think we have this logic in the settings already maybe we can factor it out and reuse? seems scary and it would be good to be consistent.