make evalWithProviders more abstract