change endLoading method name to loaded