existence of module homomorphisms, so that a diagram becomes commutative

Let $R$ be a ring, $f: R^k \to R^m$ aswell as $g: R^l \to R^n$ module homomorphisms and $M = coker(f)$, $N = coker(g)$. Let $p_M: R^m \to M$ and $p_N: R^n \to N$ be the natural projections.

I now want to show that for each module homomorphism $\Phi: M \to N$, there exist module homomorphisms $\psi$ and $\phi$, so that the following diagram is commutative, and I want to concretely construct a formula for $\phi$ and $\psi$:

$$\begin{array} 0R^k&\stackrel{f}{\longrightarrow}&R^m& \stackrel{p_M}{\longrightarrow} &M\\ \downarrow{\psi}&&\downarrow{\phi}&&\downarrow{\Phi}\\ R^l&\stackrel{g}{\longrightarrow}&R^n& \stackrel{p_N}{\longrightarrow} &N\\ \end{array}$$

Thanks in advance. I'm not very used to these kind of constructions.

Let $\{e_1,...,e_n\}$ denote the standard basis of $R^m$. For each $1 \leq i \leq m$, let $\phi(e_i)$ be any vector which is a representative of the coset $\Phi(e_i+Im(f))\in N$. This defines $\phi$ on the basis $\{e_1,...,e_m\}$ for $R^m$, so extend $\phi$ to all of $R^m$ by linearity. By construction, we have that $p_N(\phi(e_i)) = \phi(e_i)+Im(g) = \Phi(e_i+Im(f)) = \Phi(p_M(e_i))$, so by linearity we have that $p_N \circ \phi = \Phi \circ p_M$.
I claim that $\phi(Im(f)) \subset Im(g)$. This is true because if $m \in R^k$, then $p_N(\phi(f(m)))=\Phi(p_M(f(m))) = \Phi(0) = 0$, so $\phi(f(m)) \in \ker(p_N)=Im(g)$.
Next, let $\{a_1,...,a_k\}$ denote the standard basis of $R^k$. For $1\leq j \leq k$, define $\psi(a_j)$ to be any element of $R^l$ for which $g(\psi(a_j))=\phi(f(a_j))$. We can do this since $\phi(Im(f))\subset Im(g)$. We have defined $g$ on a basis for $R^k$, so just extend by linearity as before.