I moved the logic to the provider.