added a isLoading state