Epimorphisms of the Category of Hausdorff topological spaces Hi there i need help with verifying if my proof is sound:
Let $f:X \rightarrow Y$ be a morphism of the category of Hausdorff topological spaces. Prove that $f$ is a epimorphism iff  $f$ is a continuous map whose image is dense.
Proof: Recall that to show what morphisms are epimorphims we need to show for what conditions for $f:X \rightarrow Y$ we have for any parallel morphisms $h_1,h_2:Y\rightarrow Z$ with $h_1\circ f=h_2\circ f$ implies that $h_1=h_2$.
$"\Rightarrow"$: Let $f:X \rightarrow Y$ be a morphism where $X,Y \in \text{Ob}(\text{HausTop} )$. By way of contradiction assume that $f$ is not continuous map whose image is dense, i.e. $Y\not = \overline{\text{Im}f}$. Now we construct two parallel morphisms $h_1,h_2:Y\rightarrow Z$ with $Z=\{0,1\}$ equipped with the discrete topology and defined by 
 $$h_1(y)=0 \,\,\, \forall y\in Y, \qquad  h_2(y)= \begin{cases} 
 0 & y\in \overline{\text{Im }f} \\
 1 & y\not\in \overline{\text{Im }f} \end{cases}$$ Then we have $h_1\circ f=h_2\circ f$  but $h_1\not = h_2$, which contradicts the definition of epimorphism. Therefore $Y = \overline{\text{Im }f}$ must be true.
 A: This doesn't work because $h_2$ will usually not be continuous: $h_2^{-1}(\{0\})$ is probably not open.
Instead, you will have to do some real work to construct the space $Z$ you want to use.  Hidden below is some discussion about how to think about a question like this.

 In a category with pushouts, there is a "universal" way to test whether a map $f:X\to Y$ is an epimorphism, called the "cokernel pair".  Namely, let $$\require{AMScd}  \begin{CD}  X @>{f}>> Y\\@V{f}VV @V{i}VV \\ Y @>{j}>> Z \end{CD}$$ be a pushout square.  If $f$ is an epimorphism, then since $if=jf$ we have $i=j$.  Conversely, if $i=j$, then $f$ is an epimorphism: given any object $A$ and maps $g,h:Y\to A$ with $gf=hf$, there is a unique map $p:Z\to A$ such that $g=pi$ and $h=pj$, and so $g=h$.

  So to test whether $f$ is an epimorphism, we can form the pushout $Z$ of two copies of $f$ and ask whether the two inclusions $i,j:Y\to Z$ are equal.  If you find pushouts in the category of Hausdorff spaces difficult to think about, you can just use the intuition behind them to explicitly construct a space $Z$ that works.  The idea is that you are taking two copies of $Y$, but "gluing them together" along $f$ so that the two inclusions $Y\to Z$ are equal when composed with $f$.  Think about how you might use the assumption that the image of $f$ is not dense to perform such a gluing and get a Hausdorff result.

