# Short exact sequence of modules

I am trying to show that if we have the following left splitting short exact sequence of $R-$modules:

$0 \rightarrow M \stackrel{f} \rightarrow N \stackrel{g} \rightarrow S \rightarrow 0$

then there exists $\phi:N \to M \oplus S$ $R$-module isomorphism

I know that there is $\psi:N \to M$ such that $\psi \circ f=Id_M$, and we have the epimorphism $g:N \to S$, so maybe the morphism $\beta: N \to M \oplus S$ defined as $\beta(n)=(\psi(n),g(n))$ could work ($\beta$ would be $\phi^{-1}$)

It is easy to show that $\beta$ is a module morphism. I am having some difficulty to prove it is injective and surjective, I would appreciate some help, maybe I've chosen the wrong morphism.

For the surjectivity, if you take any $(m,s)\in M\oplus S$, take $f(m)+s'-f\circ\psi(s')$ where $s'$ is any preimage of $s$ under $g$.
For injectivity, if $(\psi(n),g(n))=(0,0)$, then $n$ is in the image of $f$ because the sequence is exact, i.e. $n=f(m)$, but then $0=\psi (n)=\psi\circ f (m)=m$ and so $n=0$