added provider factory functionality