added `isLoading()` and `setLoading()` methods so we can display a loading state without affecting the state