detect provider automatically; closes #6