initial work for provider and clean up template