Show that $\pi_1(X)$ is abelian iff all basepoint-change homomorphisms $\beta_h$ depend only on the endpoints of the path $h$. 
For a path-connected space $X$, show that $\pi_1(X)$ is abelian iff all basepoint-change homomorphisms $\beta_h$ depend only on the endpoints of the path $h$.

For the first direction if I take two suppose that $\pi_1(X)$ is abelian, then picking paths $h_1,h_2$ from $x_0$ to $x_1$ I have that $\beta_{h_1}[f]=[h\cdot f \cdot \overline{h}]$ but this is the same as the loop $[h_1 \cdot f \cdot \overline{h_2}][h_2 \cdot \overline{h_1}]$ and now using the fact that $\pi_1(X)$ is abelian I get that $$\beta_{h_1}[f]=[h \cdot f \cdot \overline{f}]= [h_1 \cdot f \cdot \overline{h_2}][h_2 \cdot \overline{h_1}] = [h_2 \cdot \overline{h_1}][h_1 \cdot f \cdot \overline{h_2}] = \beta_{h_2}[f]$$ and that concludes the first direction.
The converse I don't know how to show. I need to show that $[f][g]=[g][f]$ for two loops $[f],[g] \in \pi_1(X)$ using the fact that $\beta_h$ only depends on the endpoints of the paths $h$. What is the idea here?
 A: Proof by contrapositive. Assume that $\pi_1(X)$ is not Abelian. Then for some loops $[a],[b]\in\pi_1(X)$, $[a][b]\not=[b][a]$ and thus $[b]^{-1}[a][b]\not=[a]$. But, for the constant loop $[x_{0}]$, we have $[x_{0}]^{-1}[a][x_{0}]=[a]$. The negation of the given condition is satisfied.
A: Assume $\pi_{1}(X)$ is not abelian. Then there exist $[\alpha]$, $[\beta]\in \pi_{1}(X,p)$ such that $[\alpha][\beta]\neq [\beta][\alpha]$, which implies $[\beta^{-1}][\alpha][\beta]\neq[\alpha]$. Since for a path $h$ from $p$ to $q$ in $X$, $\beta_{h}:\pi_{1}(X,p) \rightarrow \pi_{1}(X,q)$ is an isomorphism, $\beta_{h}([\beta^{-1}][\alpha][\beta])\neq\beta_{h}([\alpha])$. Notice that $\beta h$ is also a path from $p$ to $q$ and $\beta_{h}([\beta^{-1}][\alpha][\beta]) = \beta_{\beta h}([\alpha])\neq \beta_{h}([\alpha]) \implies$ $\beta_{\beta h}$ and $\beta_{h}$ define two different basepoint change homomorphisms on $X$ although $\beta h$ and $h$ have the same endpoint, $q$.
$\implies$ $\beta_{h}$ doesn't only depend on the endpoint of $h$.
