I think this would be cleaner with a helper function with a clear name.