tidying up type and provider