The textbook's way of deriving a natural deduction proof of $\vdash((\phi\leftrightarrow\psi)\leftrightarrow\phi)$ feels wrong. The problem is
"Show that if we have a derivation $D$ of $\psi$ with no undischarged assumptions, then we can use it to construct, for any statement $\phi$, a derivation of $((\phi\leftrightarrow\psi)\leftrightarrow\phi)$ with no undischarged assumptions."
Here is my solution.

Below is the textbook's solution.

As you can see on the textbook solution, $\phi$ and $\psi$ cross over to another branch to introduce $\rightarrow$. The textbook didn't mention it was possible. Is the textbook solution a correct derivation of the proof?
Update 1 : I want to solve exercises with what the author explicitly allowed in the textbook. The author wrote:




There is no error; an allowed way to use $\to$-intro is to discharge a "non-existent" assumption, i.e.:

$\psi \vdash \phi \to \psi$,

as in the two top-right branches. 
This corresponds to the fact that $\psi \to (\phi \to \psi)$ is a tautology; thus, assuming $\psi$, by modus ponens $(\phi \to \psi)$ follows, for $\phi$ whatever.
See the textbbok's comment on the rule, page 17:

The rule is still correctly applied if we do not discharge all of them; in fact the rule is correctly applied even if $\phi$ is not an assumption of $D$ at all, so that there is nothing to discharge. Example 2.4.4 (page 19) will illustrate these points.

