added function type to object createProvider;