register returns the provider object so that it can be used for deregistering