Determinant of a matrix using cofactor expansion - confused

Hey! I am studying for my linear algebra exam and am having some trouble with determining the determinant of a square matrix using cofactor expansion.

Here is an example of what I am having trouble with:

** Question **

$\displaystyle \displaystyle \begin{bmatrix}

0 & 3 & 1\\

1 & 1 & 2\\

3 & 2 & 4\\

\end{bmatrix}

$

** Attempted solution **

I know that the determinant of this matrix is 5, I just can't seem to get that answer in what I am doing. I will use the first row in this attempt:

$\displaystyle 0 * \displaystype \begin{bmatrix}

1 & 2\\

2 & 4\\ \end{bmatrix}

$

$\displaystyle + 3 * \displaystype \begin{bmatrix}

1 & 2\\

3 & 4\\ \end{bmatrix}

$

$\displaystyle + 1 * \displaystype \begin{bmatrix}

1 & 1\\

3 & 2\\ \end{bmatrix}

$

then replacing those 2x2 matrices with their determinants gives:

$\displaystyle (0 * 0) + (3 * -2) + (1 * -1) $

$\displaystyle = -7 $

Which is NOT 5. I tried this with other columns and rows and am getting different answers for those. Am I doing this wrong or does it not work on some matrices???

Hopefully someone can help! Thanks for looking :)