use type in provider module to determine what class to use for the API
fix typo