added isLoading statement