Model-Theory, construction of a model with certain properties 
Let $\mathcal{M}$ be an arbitrarily large infinite model. Let $X$ be a random set.
Show: It exists a model $\mathcal{M}'$, such that
a) $\mathcal{M}'\models\varphi\Leftrightarrow\mathcal{M}\models\varphi$ for every theorem $\varphi$, and
b) it exists an injective function $f: X\to|\mathcal{M}'|$

($|\mathcal{M}'|$ means the carrier set of the model $\mathcal{M}'$)
Hello,
I have a question to this task.
I want to construct a model $\mathcal{M}'$ such that it satisfies the conditions a) and b).
First of all I have a question to the random set $X$.
We have to construct $\mathcal{M}'$ to a given set $X$ which is random, but fixed, right. Therefore $\mathcal{M}'$ is dependend on $X$.
Else it does not make sense, because if $\operatorname{card}(X)>\operatorname{card}(|\mathcal{M}'|)$ you can not always find an injective function $f$.
For example if $X=\mathbb{R}$ and $|\mathcal{M}'|=\mathbb{N}$.
Do you have a hint, how to construct this model?
Thanks in advance.

Hint: Expand the language with constants $c_x$, $x\in X$. Apply compactness to  $\operatorname{Th}(\mathcal M)\cup \{c_x\neq c_{x'}\mid x\neq x'\}$.
