Is my proof by natural deduction for $(p\rightarrow (q\rightarrow r))\rightarrow (q\rightarrow (p\rightarrow r))$ correct? 
*

*$\left(p\rightarrow\left(q\rightarrow r\right)\right)$---premise

*q---assumption

*p---assumption

*$q\wedge p$---by $\wedge$-Intro from 2 and 3

*q---by $\wedge$-elim from 4 

*p---by $\wedge$-elim from 4

*$q\rightarrow r$---by $\rightarrow$-elim from 1 and 6

*r------by $\rightarrow$-elim from 5 and 7

*$p\rightarrow r$---by $\rightarrow$-Intro from 3 and 8

*$q\rightarrow\left(p\rightarrow r\right)$---by $\rightarrow$-Intro from 2 and 9

*$\left(p\rightarrow\left(q\rightarrow r\right)\right)\rightarrow\left(q\rightarrow\left(p\rightarrow r\right)\right)$---by $\rightarrow$-Intro from 1 and 10


Also is there any other way to do this proof by natural deduction?
 A: eliminating 4,5 and 6 which were unnecessary, the correct proof is:


*

*$\quad\bullet\; \left(p\rightarrow\left(q\rightarrow r\right)\right)$ --- premise

*$\quad\bullet \quad\bullet\;q$ --- assumption

*$\quad\bullet\quad\bullet\quad\bullet\;p$ --- assumption

*$\quad\bullet\quad\bullet\quad\bullet\;q\rightarrow r$ --- by $\rightarrow$-elim from 1 and 3

*$\quad\bullet\quad\bullet\quad\bullet\;r$ --- by $\rightarrow$-elim from 2 and 4

*$\quad\bullet\quad\bullet\;p\rightarrow r$ --- by $\rightarrow$-Intro from 3 and 5

*$\quad\bullet\;q\rightarrow \left(p\rightarrow r\right)$ --- by $\rightarrow$-Intro from 2 and 6

*$\; \left(p\rightarrow\left(q\rightarrow r\right)\right)\rightarrow \left(q\rightarrow \left(p\rightarrow r\right)\right)$ --- by $\rightarrow$-Intro from 1 and 7

A: $$\dfrac{\quad\dfrac{[p \to (q \to r)]}{\quad\dfrac{\quad\dfrac{[q]}{\quad\dfrac{\dfrac{\dfrac{[p]}{q \to r}{\small\text{MP}}}{r}{\small\text{MP}}}{p \to r}{\small\to\text{I}}\quad}\quad}{q \to (p \to r)}{\small\to\text{I}}\quad}\quad}{(p \to (q \to r)) \to (q \to (p \to r))}{\small\to\text{I}}$$
