Cosine between two vectors

**The question:**

Given the vectors **p** = (1 1 -1) and **q** = (2 1 -1), find the cosine between **p** and **q**.

**My attempt:**

I found the magnitude of p and q, which are $\displaystyle \sqrt{3}$ and $\displaystyle \sqrt{6}$ respectively.

I then found the dot product of the vectors, which resulted in 4.

Using $\displaystyle a.b = |a||b|cos\theta$ I rearranged the equation to:

$\displaystyle cos\theta = \frac{a.b}{|a||b|}$

Substituting the values I got $\displaystyle \frac{4}{3\sqrt{2}}$

The answer in the text is $\displaystyle \frac{2\sqrt{2}}{6}}$

What am I doing wrong? Thanks!